package com.t7;

/**
 * Created by xuyiwei on 2018/7/18.
 */

class Frog{
    private String s = "2";

    public void s1(){
        System.out.println("Frog:"+s+"");
    }
}
public class Amphibian  extends  Frog{

    public void s1(){
        System.out.println("Amphibian:1");
    }

    public static void main(String[] args) {
        Frog a = new Amphibian();
        a.s1();

//        String str1 = "abc";
//        String str2 = "abc";
//
//        str1 = "bcd";
//
//        String str3 = str1;
//        System.out.println(str3); //bcd
//        str1 = "aaa";
//        System.out.println(str3); //bcd
//
//        String str4 = "bcd";
//        System.out.println(str1 == str4); //true
    }
}

